<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>文档集中-hubangmao</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
				content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">

	<link rel="shortcut icon" href="/favicon.ico"/>
	<link type="text/css" rel="stylesheet" href="/lib/layui/css/layui.css" media="all"/>
	<link type="text/css" rel="stylesheet" href="/lib/css/sys.style.css" media="all"/>
	<link type="text/css" rel="stylesheet" href="/lib/css/index.css" media="all"/>
</head>
</html>
<body>
<div class="page-main">
	<div class="page-head">
		<span>hubangmao.io</span>
		<div class="page-nav">
			<span class="nav-sel">文档</span>
			<span>示例</span>
		</div>
	</div>
	<div class="left-menu">
		<ul class="layui-nav layui-nav-tree layui-inline" lay-filter="left-menu" style="margin-right: 10px;">
			<li class="layui-nav-item layui-nav-itemed">
				<a href="javascript:;">Layui</a>
				<dl class="layui-nav-child">
					<dd><a data-id="1"
								 docUrl="openTable/demo/doc.html"
								 demoUrl="openTable/demo/index1.html">OpenTable</a>
					</dd>
				</dl>
			</li>
			<li class="layui-nav-item layui-nav-itemed">
				<a href="javascript:;">其他</a>
				<dl class="layui-nav-child">
					<dd><a data="">....</a></dd>
				</dl>
			</li>
		</ul>
	</div>

	<div class="right-iframe-content">
		<iframe></iframe>
	</div>

</div>


</body>
<script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/lib/sys.config.js" charset="utf-8"></script>
<script>
  layui.use(["jquery", 'element'], function () {
    layui.element.on('nav(left-menu)', function (elem) {
      var spans = $(".page-nav span");
      spans.eq(0).attr("data", elem.attr("docUrl") || '');
      spans.eq(1).attr("data", elem.attr("demoUrl") || '');

      setTimeout(function () {
        $(".page-nav span").eq(parseInt(getQueryString("type", 0))).click();
      }, 50)

    });

    $(".page-nav span").click(function () {
      $(".nav-sel").removeClass("nav-sel");
      $(this).addClass("nav-sel");
      $(".right-iframe-content iframe").attr("src", $(this).attr("data"));
    });

    //打开连接
    var href = getQueryString("href", undefined);
    if (href) {
      $(".left-menu a[data-id='" + getQueryString("href") + "']").click();
    } else {
      $(".left-menu a").eq(1).click();
    }

  })

</script>
</html>
